using UnityEngine;
// [Assembly-CSharp.dll].CFX_ShurikenThreadFix
public class CFX_ShurikenThreadFix : MonoBehaviour
{
    
    #region CFX_ShurikenThreadFix.<WaitFrame>d__2
    // [Assembly-CSharp.dll].CFX_ShurikenThreadFix.<WaitFrame>d__2
    private sealed class _WaitFrame_d__2 : IEnumerator<object>, IEnumerator, IDisposable
    {
        // Fields
        private int __1__state;
        private object __2__current;
        public CFX_ShurikenThreadFix __4__this;
        
        // Properties
        private object System.Collections.Generic.IEnumerator<System.Object>.Current { get; }
        private object System.Collections.IEnumerator.Current { get; }
        
        // Methods
        public _WaitFrame_d__2(int __1__state)
        {
            this.__1__state = __1__state;
        }
        private void System.IDisposable.Dispose()
        {
        
        }
        private bool MoveNext()
        {
            if(this.__1__state != 1)
            {
                    if(this.__1__state != 0)
            {
                    return false;
            }
            
                this.__2__current = 0;
                this.__1__state = 0;
                this.__1__state = 1;
                return false;
            }
            
            this.__1__state = 0;
            if(this.__4__this.systems.Length < 1)
            {
                    return false;
            }
            
            var val_2 = 0;
            do
            {
                if(val_2 >= this.__4__this.systems.Length)
            {
                    throw new NullReferenceException();
            }
            
                this.__4__this.systems[val_2].Play(withChildren:  true);
                val_2 = val_2 + 1;
            }
            while(val_2 < this.__4__this.systems.Length);
            
            return false;
        }
        private object System.Collections.Generic.IEnumerator<System.Object>.get_Current()
        {
            return (object)this.__2__current;
        }
        private void System.Collections.IEnumerator.Reset()
        {
            27351792 = new System.NotSupportedException();
            throw 27351792;
        }
        private object System.Collections.IEnumerator.get_Current()
        {
            return (object)this.__2__current;
        }
    
    }
    
    #endregion
    
    // Fields
    private UnityEngine.ParticleSystem[] systems;
    
    // Methods
    private void OnEnable()
    {
        var val_3 = this;
        this.systems = this.GetComponentsInChildren<System.Object>();
        if(val_1.Length >= 1)
        {
                var val_3 = 0;
            do
        {
            if(val_3 >= val_1.Length)
        {
                throw new NullReferenceException();
        }
        
            val_3 = mem[val_1.Length + 32];
            val_3 = val_1.Length + 32;
            val_3.Stop(withChildren:  true);
            val_3.Clear(withChildren:  true);
            val_3 = val_3 + 1;
        }
        while(val_3 < val_1.Length);
        
        }
        
        UnityEngine.Coroutine val_2 = this.StartCoroutine(methodName:  -1610601405);
    }
    private System.Collections.IEnumerator WaitFrame()
    {
        object val_1 = 536897737;
        val_1 = new System.Object();
        mem[536897753] = 0;
        mem[536897769] = this;
        return (System.Collections.IEnumerator)val_1;
    }
    public CFX_ShurikenThreadFix()
    {
    
    }

}
